<%@ page language="java" import="com.entity.GoodsInfo,java.text.DecimalFormat" pageEncoding="utf-8" %>
<%@page import="java.util.ArrayList" %>
<%@page import="com.entity.GoodsEvaluate" %>
<%@page import="com.entity.GoodsType" %>
<%@page import="com.util.PublicToolShowDetailTypeList" %>
<%@page import="com.util.PublicToolGetTypeDetailInfo" %>
<%@page import="com.dao.GoodsTypeDetailInfoDAO" %>
<%@page import="com.entity.GoodsType" %>
<%@page import="com.entity.GoodsTypeDetail" %>
<%@page import="com.util.PublicToolCheckParam" %>
<%@page import="com.entity.SalesGoods" %>
<%@page import="com.util.PublicToolShowGooodsTypeList" %>
<%@page import="com.entity.BulletinInfo" %>

<%@page import="com.entity.GoodsInfo" %>
<%@page import="com.util.PublicToolIndexProductShow" %>
<%@page import="com.entity.GoodsTypeDetail" %>
<%@page import="com.entity.GoodsEvaluate" %>
<%@page import="com.util.PublicToolCheckParam" %>
<%@page import="com.entity.SalesGoods" %>
<%@page import="com.util.PublicToolCheckParam" %>
<%@page import="java.util.ArrayList" %>
<%@page import="com.entity.ServiceAssessment" %>
<%@page import="com.entity.GoodsType" %>
<%@page import="com.util.PublicToolShowDetailTypeList" %>
<%@page import="com.util.PublicToolGetTypeDetailInfo" %>
<%@page import="com.dao.GoodsTypeDetailInfoDAO" %>
<%@page import="com.entity.GoodsType" %>
<%@page import="com.entity.GoodsTypeDetail" %>
<%@page import="com.entity.CustomerDetailInfo" %>
<%@page import="com.dao.CustomerDetailInfoDAO" %>
<%@page import="com.dao.CustomerInfoDAO" %>

<%@page import="com.dao.CustomerInfoDAO" %>
<%@page import="com.entity.CustomerInfo" %>

<%
    GoodsInfo productInfo = (GoodsInfo) request.getAttribute("productInfo");
%>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<%
    String email = (String) session.getAttribute("email");
    String thirdemail = (String) session.getAttribute("thirdemail");
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<base href="<%=basePath%>">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7">
    <title>医生坐诊列表</title>
    <meta content="" name="keywords">
    <meta content="" name="description">
    <link href="css/common.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="./js/base.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>
    <script type="text/javascript" src="js/time.js"></script>
    <script type="text/javascript" src="js/lb.js"></script>

    <script type="text/javascript">
        function checkLogin() {
            if ("<%=email%>" == "" || "<%=email%>" == "null") {
                alert("请先登陆!");
                return false;
            }
            else {
                top.location.href = "servlet/DoMethod?method=showMyInformation";
                return true;
            }
        }
        function checkUserLogin() {
            if ("<%=email%>" == "" || "<%=email%>" == "null") {
                alert("请先登陆!");
                return false;
            }
            else {
                top.location.href = "servlet/DoChatMethod?method=login";
                return true;
            }
        }
    </script>

    <!---reload-!-->
</head>
<body style="background:transparent url(images/bg.jpg) repeat scroll 0% 0%" onload="times()">
<div id="contain">

    <!-- 头 -->

    <jsp:include page="top.jsp" flush="true"/>


    <!-- 头 -->


    <!-- 第二部分内容 -->
    <div class="box" style=" margin-top:1px;   background: url(images/pbg.gif);">
        <div class="left">
            <jsp:include page="left.jsp" flush="true"/>

        </div>
        <div class="right">
            <div class="boxtitlebg mbnav"><a href="">首页</a> &gt; 专家医生坐诊信息</div>

            <!--内容-->
            <div style="padding:10px">
                <%
                    String photoadd = "";
                    if (PublicToolCheckParam.checkNullAndEmpty(productInfo.getPhoto())) {
                        photoadd = "<img src='" + productInfo.getPhoto() + "'  height='252' width='352' />";
                    } else {
                        photoadd = "<img src='images/defaultpic.gif'  height='352' width='352' />";
                    }
                    DecimalFormat df = new DecimalFormat("0.00");
                    String currentPrice = df.format(productInfo.getDiscountPrice());
                    int countRequire = productInfo.getCountRequire();
                    if (countRequire == 0) {
                        countRequire = 1;
                    }
                %>

                <div class="mt10 productsinfo" align="left" style="padding:10px">
                    <div class="fr textinfo">
                        <h2 align="center"><%=productInfo.getGoodsName()%>
                        </h2>
                        <ul class="pinfo1">
                            <li><span>挂号费：</span><strong>¥<%=currentPrice%>
                            </strong></li>
                            <li><span>编号：</span> <%=productInfo.getGoodsId()%>
                            </li>
                        </ul>
                        <form action="servlet/Shopping?method=g&gid=<%=productInfo.getGoodsId()%>" method="post">
                            <input type='image' src='images/button_gh.jpg' style='cursor: pointer;'/>
                        </form>
                        <div class="clr"></div>
                    </div>
                    <div class="clr"></div>
                </div>
                <div class="clr"></div>
                <div class="mt10 productsbox">
                    <h2> 坐诊信息 </h2>
                    <div class="productscontent">
                        <div class="fl preview"><%=photoadd%>
                        </div>

                        <%=productInfo.getRemark()%>
                    </div>
                    <br>
                        <div id="evaluateTable">
                            <font color="#FF6699"><strong>患者留言评价记录：</strong></font><br/><br/>
                            <%
                                ArrayList<ServiceAssessment> serviceAssessmentList = (ArrayList<ServiceAssessment>)request.getAttribute("serviceAssessmentList");

                                out.println("<tr><td height='40' style='padding-left:20px'><font color='#666666'></font></td></tr>");
                                if(serviceAssessmentList.size() == 0){
                                    out.println("<tr><td style='padding-left:40px' colspan='2'><div id='serviceAssessmentTable'> 暂无用户留言评价</div></td></tr>");
                                }
                                else{
                                    out.print("<tr><td style='padding-left:40px' colspan='2'><div id='serviceAssessmentTable'>");

                                    for(int i=0;i< serviceAssessmentList.size();i++){
                                        ServiceAssessment assessmentInfo = serviceAssessmentList.get(i);
                                        //患者信息
                                        CustomerDetailInfoDAO cddao = new CustomerDetailInfoDAO();
                                        CustomerDetailInfo customerDetailInfo = cddao.getCustomerDetailInfo(assessmentInfo.getCustomerId());
                                        out.print(""+assessmentInfo.getAssessmentTime()+"&nbsp;&nbsp;&nbsp;&nbsp;<B>"+customerDetailInfo.getName()+"</B>留言评价道：&nbsp;&nbsp;"+assessmentInfo.getServiceAssessment()+"<br/><br/>");
                                    }
                                    out.println("</div></td></tr>");
                                }
                            %>
                        </div>
                </div>
                <!--内容-->
            </div>
        </div>
        <!-- 第二部分内容 -->
    </div>
    <!--底部-->
    <jsp:include page="bottom.jsp" flush="true"/>
</div>
</body>
</html>



